//
//  AllstatisticsView.m
//  兼职页面
//
//  Created by kuiyuan liang on 2021/5/23.
//

#import "AllstatisticsView.h"
#import "TipView.h"
#import "LeftTitleView.h"
#import "CommonUtil.h"
#import "ReportDataView.h"

@interface AllstatisticsView()

@property (strong, nonatomic) LeftTitleView * leftTitleView;
@property (strong, nonatomic) TipView * tipView;
@property (strong, nonatomic) ReportDataView * dataView;

@end


@implementation AllstatisticsView

-(instancetype)initWithFrame:(CGRect)frame{
    if (self = [super initWithFrame:frame]) {
        [self addSubview:self.leftTitleView];
        [self addSubview:self.tipView];
        [self addSubview:self.dataView];
        self.backgroundColor = RGB(243.0, 243.0, 243.0);
    }
    return self;
}




- (LeftTitleView *)leftTitleView{
    if (!_leftTitleView) {
        _leftTitleView = [[LeftTitleView alloc] initWithFrame:CGRectMake(0, 0, AD(70), self.height)];
    }
    return _leftTitleView;
}

-(TipView *)tipView{
    if (!_tipView) {
        _tipView = [[TipView alloc] initWithFrame:CGRectMake(_leftTitleView.width + AD(5), AD(5), SCREEN_WIDTH-self.leftTitleView.width-AD(10), AD(150))];
    }
    return _tipView;
}

-(ReportDataView *)dataView{
    if (!_dataView) {
        _dataView = [[ReportDataView alloc] initWithFrame:CGRectMake(_leftTitleView.right, self.tipView.bottom, SCREEN_WIDTH-self.leftTitleView.width, self.height-self.tipView.bottom)];
    }
    return _dataView;
}

@end
